<template>
  <a-modal
    :title="title"
    :width="800"
    :visible="visible"
    :confirmLoading="confirmLoading"
    @ok="handleOk"
    @cancel="handleCancel"
    cancelText="关闭">
    <table class="t">
      <tr>
        <td>竞拍人</td>
        <td>竞拍价格</td>
        <td>竞拍时间</td>
      </tr>
      <tr v-for="item in list">
        <td>{{item.name}}</td>
        <td>{{item.auctionPrice}}</td>
        <td>{{item.auctionTime}}</td>
      </tr>
    </table>
    
  </a-modal>
</template>

<script>
  import { httpAction,getAction } from '@/api/manage'
  import pick from 'lodash.pick'
  import moment from "moment"

  export default {
    name: "AuctionRecordModal",
    data () {
      return {
        title:"操作",
        visible: false,
        //model: {},
        confirmLoading: false,
        //form: this.$form.createForm(this),
        list:[]
      }
    },
    watch: {
      visible(val) {
        if (val) {
          //alert(this.visible)
          //this.list = _.cloneDeep(this.dataClose.status)
        }
      }
    },
    methods: {
      add () {
        this.edit({});
      },
      edit (record) {
        this.visible = true;
        getAction('auctionrecord/auctionRecord/list/'+record).then(res=>{
            if (res.success) {
             this.list = res.result.records
             //console.info(list)
            }
          })
     
      },
      close () {
        this.$emit('close');
        this.visible = false;
      },
      handleCancel () {
        this.close()
      },


    }
  }
</script>

<style lang="scss" scoped="" type="text/scss">
.t{
  border: black 1px solid;
  width: 80%;
  margin: auto;
  line-height: 30px;
  tr{
    border: black 1px solid;
  }
  td{
    border: black 1px solid;
    margin: auto;
    font-size: 15px;
    text-align: center;
  }
}
</style>